1. Field of the Invention
The present invention relates generally to image processing, and more specifically pertains to devices using an interpolation method for improvement of images obtained with imaging systems having a low number of samples per image pixel.
2. Description of Related Art
In a photographic imaging system three components of color information have to be captured simultaneously. To create an analogous digital imaging system which simultaneously captures all three components of color information would require three separate imaging detectors, which would be prohibitive in cost and packaging complexity. To keep the size of a digital video imaging system and its cost to a minimum, the number of sampled image data, transferred from the imaging system to an image processing device, has to be kept low. Moreover, lately, the electronic still and video imaging systems have been using silicon chips for image sensor arrays, and since the size of the chip should be kept small, these imaging systems have to transfer a low number of samples per image pixel. Therefore, the electronic imaging systems typically use a single detector, usually covered with a filter mosaic called a color filter array (CFA), and acquire a scene image by sampling in three color components to obtain an array which stores only one color component per pixel. These imaging systems use a low number of samples per image pixel because they ignore the other two color components for each pixel.
Since each filter of the color filter array covers a single pixel and passes only a color in a specific spectral band, before the image gets to be processed further and displayed, the scene color has to be reconstructed so that each pixel has all three color components. Therefore, the two missing color components for each pixel have to be estimated by a color reconstruction technique. Conventional color reconstruction methods use conventional interpolation techniques to include replication of the values of nearest neighbors, while others use linear or logarithmic interpolation averaging techniques, usually interpolating an average intensity value of the neighboring pixels of the missing color. For example, in the RGB system where there are red, green and blue pixels, for each green pixel the missing red and blue color components have to be reconstructed by the interpolation method, using, for example, the adjacent pixels with the same-color components.
The interpolation problem is quite complex and when selecting the interpolation technique the nature and size of the interpolation error should be considered. Moreover, real time applications require an interpolation algorithm with minimum computational complexity. Further, the method for reconstruction of the missing color components should provide high quality images which are sharp and without color artifacts.
The color artifacts usually occur around edges of an image due to high spatial frequency. Localized spatial features, such as image edges and areas where hues of adjacent pixels change abruptly, can cause color and luminance estimates obtained with the conventional interpolation methods to be quite inaccurate, which may lead to significant pixel artifacts in the final image. Further, in imaging systems with low number of samples per image pixel, color artifacts occur when one of the color components is missing the necessary pixel required to reconstruct the edge by the interpolation method.
The conventional interpolation algorithms do not provide sharp enough images without color artifacts and appear to be inadequate. Moreover, the interpolation errors, which result from use of the conventional interpolation algorithms, are propagated through the rest of the imaging chain. A sharpening filter is usually applied to improve the image quality before displaying the image. However, in the conventional algorithms, the color artifacts are not corrected with a sharpening filter, but are typically further boosted when a sharpening filter is applied.
Therefore, there is a need for an interpolation algorithm for digital imaging systems which use a low number of samples per image pixel, which can provide the missing color components with high accuracy, and provide sharp images without color artifacts.
It is a primary object of the present invention to overcome the aforementioned shortcomings associated with the prior art and provide an image processing device which uses a low number of samples per pixel, preferably only one color component for each pixel, and is capable of generating sharp, artifact-free color images.
Another object of the present invention is to provide a reconstruction method which uses an interpolation algorithm capable of providing high quality images, which are sharp and without color artifacts around edges.
Yet another object of the present invention is to provide an interpolation method with minimum computational complexity which can be implemented in a computer program, and preferably embedded in computer hardware.
These as well as additional objects and advantages of the present invention are achieved by providing an image processing device which receives from an imaging system an image having a pixel pattern which has a half-pixel offset in a horizontal direction in every second row, in order to provide a more uniform sampling of the image for each color component.
The interpolation method of the present invention determines the missing color components at each pixel from the neighboring pixels. The missing color components are obtained as the hue-weighted intensity values of neighboring pixels of the same color. The choice of which neighboring pixels to use is based on the values of four edge detection kernels applied to the current pixel, and on the intensity value of the current pixel. The four edge kernels are sensitive to horizontal, vertical, +30 degrees and xe2x88x9230 degrees edges, in arrays with half-pixel offset. The choice of these neighboring pixels is based on the edge direction and the side of the edge the current pixels belong to in the image.
After reconstruction of the missing color components at each pixel, a reconstructed array of color pixels is obtained. This array preferably has every second row offset from its neighboring rows by a half-pixel. To correct this offset prior to image display or printing, every second row is interpolated horizontally or vertically. Because the horizontal interpolation may result in a saw-tooth effect at vertical edges, this effect is corrected by vertical interpolation at vertical edges.
The method of the present invention uses an algorithm which is computationally simple and amenable to hardware implementation by embedding, since it requires simple integer arithmetic and binary shifts for addition, subtraction, multiplication and division by one of the two integers, 3 or 5. Since all divisions are performed by dividing integer values with 3 or 5, the divisions can be avoided by using predetermined division results implemented in a look-up table.